package cn.ztelovecly.springboot.bussiness.svc;

import cn.ztelovecly.springboot.bussiness.biz.UserManager;
import cn.ztelovecly.springboot.contract.request.UserCreateRequest;
import cn.ztelovecly.springboot.contract.response.UserCreateResponse;
import cn.ztelovecly.springboot.contract.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.validation.Validator;

/**
 * Created by zhaotianen on 2017/2/18.
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserManager userManager;

    @Override
    public UserCreateResponse createUser(UserCreateRequest request) {
        UserCreateResponse response = new UserCreateResponse();

//        if(response.hasError()) {
//            return response;
//        }
        response = userManager.create(request);
        return response;
    }
}
